<?php
$message = new BWMessage($messageId);
$messageName = $message->name;
$question = 'no-question';
$inputMedia = $message->getInputMediaManager()->getInputMedia('myPools');
$courtConfigList = array();
if ($inputMedia instanceof BWInputMedia) {
    $question = $inputMedia->content;
    $inputType = $inputMedia->getInputType();
    if ($inputType instanceof BWKeyValueType) {
        $courtConfigList = $inputType->getInputableList();
    }
}

$model = new BDynamicFormModel();
$inputValueField = 'iMedia_' . $inputMedia->getId();
$model->addField($inputValueField);
?>

<legend><?php echo $messageName; ?></legend>

<div class="form">
    <?php
    $url = $control->getLinkUrl(array(
        'name' => yii::t('site', 'Submit'),
        'id' => 'saveInputValue'));
    ?>
    <?php echo CHtml::beginForm($url); ?>

    <?php echo CHtml::errorSummary($model); ?>   

    <div class="row"><strong>Question: <?php echo $question; ?></strong></div>

    <div>
        <?php echo CHtml::activeRadioButtonList($model, $inputValueField, $courtConfigList); ?>   
    </div>
    <div class="row submit">
        <?php
        echo CHtml::submitButton('Submit');
        ?>       
    </div>    

    <?php echo CHtml::endForm(); ?>
</div><!-- form -->